﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace SchoolLibrary.Utils
{
    public class StringUtil
    {
        public const string SPACE = " ";

        public const int BACKSPACE_CHAR_CODE = 8;

        public const string NOT_DIGITS_PATERN = "[^0-9]*";

        public const string DIGIT_PATERN = "[0-9]";

        public static bool isEmptyString (string str)
        {
            if (str == null || str.Length == 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public static bool isDigit(char c)
        {
            return Regex.IsMatch(c.ToString(), DIGIT_PATERN);
        }
    }
}
